#!/bin/bash
for i in {1..255}
do
	ping -c 3 -i 0.2 -W 1 192.168.4.$i &>/dev/null
	if [ $? -eq 0 ];then
	   echo "host 192.168.4.$i is up"
	else
           echo "host 192.168.4.$i is down"
         fi
done
